-- GENERATED SPELL FOR [Mossflayer Shadowhunter] --


function spell0_8561(pUnit, Event) --@Shadow Shot,n/a--
pUnit:FullCastSpellOnTarget(17171,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8561', 0, 1)
end

function spell1_8561(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8561', 605, 1)
end

function Sorts_8561(pUnit, Event)
local choix_sorts_8561 = math.random(0, 1)
if choix_sorts_8561 == 0 then
pUnit:RegisterEvent('spell0_8561', 1, 1)
end
if choix_sorts_8561 == 1 then
pUnit:RegisterEvent('spell1_8561', 1, 1)
end
end

function mob8561_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8561', math.random(1500, 3000), 1)
end

function mob8561_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8561_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8561_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8561, 1, 'mob8561_Action')
RegisterUnitEvent(8561, 2, 'mob8561_Leave')
RegisterUnitEvent(8561, 3, 'mob8561_Kill')
RegisterUnitEvent(8561, 4, 'mob8561_Die')
